Skip to content

Conversation

santiagodelossantos
Copy link

I'm working on a proyect where I need to destroy and recreate the svelte-virtual-list in order to reflect some changes. After doing that this error appears on the console:

Uncaught (in promise) TypeError: Cannot read property 'offsetHeight' of undefined
    at refresh

It happens that a pending refresh is failing after destroying the component, because it awaits for next ticks inside the function, and after those awaits in some moment the component is no longer available.

I prupose to mark mounted as false when the component is being destroyed so pending task can know it.

Sorry for my english 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant